<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
   <input type="text"> <img src="./微信图片_20241101143923.png" alt=""> 
</body>
</html>
<script>
    var ipt=document.querySelector('input')
    var img=document.querySelector('img');

    var f=1;
    img.onclick=function(){
        if(f==1){
            img.src='./微信截图_20241101143814.png';
            ipt.type='password';
            f=0;
        }else{
            img.src='./微信图片_20241101143923.png'
            ipt.type='text';
            f=1;
        }
    }
</script>